{extend name="./index/index" /}

{block name="list"}
<ul id="main-menu" class="main-menu">

<li>
    <a href="web/index">
        <i class="linecons-cog"></i>
        <span class="title">网站数据</span>
    </a>
</li><!--END 网站数据-->

<li class="opened active">
    <a href="">
        <i class="fa-group"></i>
        <span class="title">用户管理</span>
    </a>
    <ul>
        <li>
            <a href="/admin/index">
                <span class="title">用户列表</span>
            </a>
        </li>
        <li  class="active">
            <a href="/admin/index/user">
                <span class="title">管理员列表</span>
            </a>
        </li>
        <li>
            <a href="/admin/index/create">
                <span class="title" >添加管理员</span>
            </a>
        </li>
    </ul>
</li><!--END 用户管理-->

<li>
    <a href="">
        <i class="linecons-desktop"></i>
        <span class="title">影片管理</span>
    </a>
    <ul>
        <li class="active">
            <a href="/admin/film/index">
                <span class="title">影片列表</span>
            </a>
        </li>
        <li>
            <a href="/admin/film/create">
                <span class="title">上新电影</span>
            </a>
        </li>
        
    </ul>
</li><!--END 影片管理-->

<li>
    <a href="forms-native.html">
        <i class="linecons-params"></i>
        <span class="title">影院管理</span>
    </a>
    <ul>
        <li>
            <a href="forms-file-upload.html">
                <span class="title">全部影院</span>
            </a>
        </li>
        <li>
            <a href="forms-修改ors.html">
                <span class="title">上新影院</span>
            </a>
        </li>
        <li>
            <a href="forms-sliders.html">
                <span class="title">待续</span>
            </a>
        </li>
    </ul>
</li><!--END 影院-->

<li>
    <a href="extra-gallery.html">
        <i class="linecons-beaker"></i>
        <span class="title">订单管理</span>
    </a>
    <ul>
        <li>
            <a href="extra-icons-fontawesome.html">
                <span class="title">Icons</span>
                <span class="label label-warning pull-right">4</span>
            </a>
        </li>
    </li>
    </ul>
</li><!--END 订单-->

<li>
    <a href="ui-widgets.html">
        <i class="linecons-star"></i>
        <span class="title">暂定</span>
    </a>
    <ul>
        <li>
            <a href="extra-icons-fontawesome.html">
                <span class="title">暂定</span>
                <span class="label label-warning pull-right">4</span>
            </a>
        </li>
    </li>
    </ul>
</li>
<li>
    <a href="charts-main.html">
        <i class="linecons-globe"></i>
        <span class="title">Charts</span>
    </a>
    <ul>
        <li>
            <a href="charts-main.html">
                <span class="title">Chart Variants</span>
            </a>
        </li>
        <li>
            <a href="charts-range.html">
                <span class="title">Range Selector</span>
            </a>
        </li>
        <li>
            <a href="charts-sparklines.html">
                <span class="title">Sparklines</span>
            </a>
        </li>
        <li>
            <a href="charts-map.html">
                <span class="title">Map Charts</span>
            </a>
        </li>
        <li>
            <a href="charts-gauges.html">
                <span class="title">Circular Gauges</span>
            </a>
        </li>
        <li>
            <a href="charts-bar-gauges.html">
                <span class="title">Bar Gauges</span>
            </a>
        </li>
    </ul>
</li>
<li>
    <a href="#">
        <i class="linecons-cloud"></i>
        <span class="title">Menu Levels</span>
    </a>
    <ul>
        <li>
            <a href="#">
                <i class="entypo-flow-line"></i>
                <span class="title">Menu Level 1.1</span>
            </a>
            <ul>
                <li>
                    <a href="#">
                        <i class="entypo-flow-parallel"></i>
                        <span class="title">Menu Level 2.1</span>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <i class="entypo-flow-parallel"></i>
                        <span class="title">Menu Level 2.2</span>
                    </a>
                    <ul>
                        <li>
                            <a href="#">
                                <i class="entypo-flow-cascade"></i>
                                <span class="title">Menu Level 3.1</span>
                            </a>
                        </li>
                        <li>
                            <a href="#">
                                <i class="entypo-flow-cascade"></i>
                                <span class="title">Menu Level 3.2</span>
                            </a>
                            <ul>
                                <li>
                                    <a href="#">
                                        <i class="entypo-flow-branch"></i>
                                        <span class="title">Menu Level 4.1</span>
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#">
                        <i class="entypo-flow-parallel"></i>
                        <span class="title">Menu Level 2.3</span>
                    </a>
                </li>
            </ul>
        </li>
        <li>
            <a href="#">
                <i class="entypo-flow-line"></i>
                <span class="title">Menu Level 1.2</span>
            </a>
        </li>
        <li>
            <a href="#">
                <i class="entypo-flow-line"></i>
                <span class="title">Menu Level 1.3</span>
            </a>
        </li>
    </ul>
</li>
</ul>
{/block}




{block name="table"}
<div class="page-title">
    <div class="title-env">
        <h1 class="title">{$title}</h1>
        <p class="description">有意见就跟我提，不要对上帝的数据发脾气。</p>
    </div>
    
        <div class="breadcrumb-env">
        
                    <ol class="breadcrumb bc-1">
                        <li>
                <a href="/admin"><i class="fa-home"></i>Home</a>
            </li>
                    <li>
            
                            <a href="./index.php">用户管理</a>
                    </li>
                <li class="active">
            
                            <strong>{$title}</strong>
                    </li>
                    </ol>
                    
    </div>
        
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">{$title}</h3>
    </div>
    <div class="panel-body">
        
        
        
    <table cellspacing="0" class="table table-small-font table-bordered table-striped table-hover text-center">
        <thead>
            <tr>
                <th class="col-md-2">管理员ID</th>
                <th class="col-md-1">昵称</th>
                <th class="col-md-1">性别</th>
                <th>管理员角色</th>
                <th>最后登录时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        {volist name="data" id="val"}
                    <tr id="{$val['id']}">
                        <td>{$val['id']}</td>
                        <td>{$val['name']}</td>
                        <td>
                         {if($val['sex'] == 0)}女
                        {elseif($val['sex']==1)}男
                        {else($val['sex']==2)}保密
                        {/if}
                        </td>
                        <td>
                        {if($val['status'] == 0)} 超级管理员
                        {else}管理员
                        {/if}
                        </td>
                        <td class="col-md-3">{:date("Y-m-d H:i:s", $val['time'])}</td>
                        <td class="col-md-2">
                            <a href="/admin/index/edit?id={$val['id']}" class="btn btn-info btn-sm"   style="border-radius:10px;">修改</a>
                            <a data-id="{$val['id']}" class="btn btn-danger del btn-sm" style="border-radius:10px;">删除</a>
                        </td>
                    </tr>
                    {/volist}
                     <script>
                        $('.del').click(function(){
                            var da = $(this).attr('data-id');
                            $.ajax({
                                type : 'get',
                                url : "{:url('index/deladmin')}",
                                data : "id="+da,
                                success : function(data){
                                    $("#"+da).remove();
                                }
                            })
                        })
                    </script>
        </tbody>
    </table>
        共{:count($data)}条数据
    </div>
</div>
{/block}